package com.github.wxiaoqi.security.common.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * @author Zhao Junjian
 */
// @Getter
// @Setter
// @ToString(callSuper = true)
// @EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler", "fieldHandler" }, ignoreUnknown = true)
public class ObjectDataResponse<T> extends RestfulResponse {
	private static final long serialVersionUID = 1862906172390850647L;

	private T data;

	public T getData() {
		return data;
	}
	
	public ObjectDataResponse() {
		
	}

	public ObjectDataResponse(T data) {
		this.data = data;
	}

	public ObjectDataResponse(int code, String message, T data) {
		this.data = data;
		this.setCode(code);
		this.setMessage(message);
	}

	public ObjectDataResponse(int code, String message) {
		this.setCode(code);
		this.setMessage(message);
	}
}
